<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class User extends CI_Controller
{
	public function __construct()
	{
		parent::Controller();
		
		$this->load->model('user_model');
	}
	
	public function index()
	{
		redirect('user/login');
	}
	
	public function login()
	{
		if($_POST)
			$this->auth->login($this->input->post('user_email'), $this->input->post('user_password'));
			
		// $this->load->view('user/login', $data);
	}
	
	public function logout()
	{
		$this->auth->check();

		$this->auth->logout();
	}
}